<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #container {
            display: flex;
            justify-content: flex-end;
            background-color: lightyellow;
        }

        .box {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 50px;
            width: 75px;
            background-color: springgreen;
            border: 1px solid #333;
        }

        .box2 {
            margin-left: auto;
        }
    </style>
</head>

<body>
    <div id="container">
        <div class="box box1">1</div>
        <div class="box box2">2</div>
        <div class="box box3">3</div>
        <div class="box box4">4</div>
        <div class="box box5">5</div>
    </div>

</body>

</html>